3.26 \(\int \frac{d+e x}{(4-5 x^2+x^4)^2} \, dx\)

Optimal. Leaf size=94 \[ \frac{d x \left (17-5 x^2\right )}{72 \left (x^4-5 x^2+4\right )}+\frac{19}{432} d \tanh ^{-1}\left (\frac{x}{2}\right )-\frac{1}{54} d \tanh ^{-1}(x)+\frac{e \left (5-2 x^2\right )}{18 \left (x^4-5 x^2+4\right )}+\frac{1}{27} e \log \left (1-x^2\right )-\frac{1}{27} e \log \left (4-x^2\right ) \]

[Out]

(d*x*(17 - 5*x^2))/(72*(4 - 5*x^2 + x^4)) + (e*(5 - 2*x^2))/(18*(4 - 5*x^2 + x^4)) + (19*d*ArcTanh[x/2])/432 -
 (d*ArcTanh[x])/54 + (e*Log[1 - x^2])/27 - (e*Log[4 - x^2])/27

________________________________________________________________________________________

Rubi [A]  time = 0.0518091, antiderivative size = 94, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 9, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {1673, 12, 1092, 1166, 207, 1107, 614, 616, 31} \[ \frac{d x \left (17-5 x^2\right )}{72 \left (x^4-5 x^2+4\right )}+\frac{19}{432} d \tanh ^{-1}\left (\frac{x}{2}\right )-\frac{1}{54} d \tanh ^{-1}(x)+\frac{e \left (5-2 x^2\right )}{18 \left (x^4-5 x^2+4\right )}+\frac{1}{27} e \log \left (1-x^2\right )-\frac{1}{27} e \log \left (4-x^2\right ) \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)/(4 - 5*x^2 + x^4)^2,x]

[Out]

(d*x*(17 - 5*x^2))/(72*(4 - 5*x^2 + x^4)) + (e*(5 - 2*x^2))/(18*(4 - 5*x^2 + x^4)) + (19*d*ArcTanh[x/2])/432 -
 (d*ArcTanh[x])/54 + (e*Log[1 - x^2])/27 - (e*Log[4 - x^2])/27

Rule 1673

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1092

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> -Simp[(x*(b^2 - 2*a*c + b*c*x^2)*(a + b*x^2 + c*x^
4)^(p + 1))/(2*a*(p + 1)*(b^2 - 4*a*c)), x] + Dist[1/(2*a*(p + 1)*(b^2 - 4*a*c)), Int[(b^2 - 2*a*c + 2*(p + 1)
*(b^2 - 4*a*c) + b*c*(4*p + 7)*x^2)*(a + b*x^2 + c*x^4)^(p + 1), x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && LtQ[p, -1] && IntegerQ[2*p]

Rule 1166

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 1107

Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(a + b*x + c*x^2)^p, x],
 x, x^2], x] /; FreeQ[{a, b, c, p}, x]

Rule 614

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((b + 2*c*x)*(a + b*x + c*x^2)^(p + 1))/((p +
1)*(b^2 - 4*a*c)), x] - Dist[(2*c*(2*p + 3))/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1), x], x] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2] && IntegerQ[4*p]

Rule 616

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{d+e x}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac{d}{\left (4-5 x^2+x^4\right )^2} \, dx+\int \frac{e x}{\left (4-5 x^2+x^4\right )^2} \, dx\\ &=d \int \frac{1}{\left (4-5 x^2+x^4\right )^2} \, dx+e \int \frac{x}{\left (4-5 x^2+x^4\right )^2} \, dx\\ &=\frac{d x \left (17-5 x^2\right )}{72 \left (4-5 x^2+x^4\right )}-\frac{1}{72} d \int \frac{-1+5 x^2}{4-5 x^2+x^4} \, dx+\frac{1}{2} e \operatorname{Subst}\left (\int \frac{1}{\left (4-5 x+x^2\right )^2} \, dx,x,x^2\right )\\ &=\frac{d x \left (17-5 x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac{e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac{1}{54} d \int \frac{1}{-1+x^2} \, dx-\frac{1}{216} (19 d) \int \frac{1}{-4+x^2} \, dx-\frac{1}{9} e \operatorname{Subst}\left (\int \frac{1}{4-5 x+x^2} \, dx,x,x^2\right )\\ &=\frac{d x \left (17-5 x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac{e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac{19}{432} d \tanh ^{-1}\left (\frac{x}{2}\right )-\frac{1}{54} d \tanh ^{-1}(x)-\frac{1}{27} e \operatorname{Subst}\left (\int \frac{1}{-4+x} \, dx,x,x^2\right )+\frac{1}{27} e \operatorname{Subst}\left (\int \frac{1}{-1+x} \, dx,x,x^2\right )\\ &=\frac{d x \left (17-5 x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac{e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac{19}{432} d \tanh ^{-1}\left (\frac{x}{2}\right )-\frac{1}{54} d \tanh ^{-1}(x)+\frac{1}{27} e \log \left (1-x^2\right )-\frac{1}{27} e \log \left (4-x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0548821, size = 90, normalized size = 0.96 \[ \frac{1}{864} \left (\frac{12 \left (d x \left (17-5 x^2\right )+e \left (20-8 x^2\right )\right )}{x^4-5 x^2+4}+8 (d+4 e) \log (1-x)-(19 d+32 e) \log (2-x)-8 (d-4 e) \log (x+1)+(19 d-32 e) \log (x+2)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)/(4 - 5*x^2 + x^4)^2,x]

[Out]

((12*(e*(20 - 8*x^2) + d*x*(17 - 5*x^2)))/(4 - 5*x^2 + x^4) + 8*(d + 4*e)*Log[1 - x] - (19*d + 32*e)*Log[2 - x
] - 8*(d - 4*e)*Log[1 + x] + (19*d - 32*e)*Log[2 + x])/864

________________________________________________________________________________________

Maple [A]  time = 0.017, size = 122, normalized size = 1.3 \begin{align*} -{\frac{d}{288+144\,x}}+{\frac{e}{144+72\,x}}+{\frac{19\,\ln \left ( 2+x \right ) d}{864}}-{\frac{\ln \left ( 2+x \right ) e}{27}}-{\frac{\ln \left ( 1+x \right ) d}{108}}+{\frac{\ln \left ( 1+x \right ) e}{27}}-{\frac{d}{36+36\,x}}+{\frac{e}{36+36\,x}}-{\frac{19\,\ln \left ( x-2 \right ) d}{864}}-{\frac{\ln \left ( x-2 \right ) e}{27}}-{\frac{d}{144\,x-288}}-{\frac{e}{72\,x-144}}-{\frac{d}{36\,x-36}}-{\frac{e}{36\,x-36}}+{\frac{\ln \left ( x-1 \right ) d}{108}}+{\frac{\ln \left ( x-1 \right ) e}{27}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)/(x^4-5*x^2+4)^2,x)

[Out]

-1/144/(2+x)*d+1/72/(2+x)*e+19/864*ln(2+x)*d-1/27*ln(2+x)*e-1/108*ln(1+x)*d+1/27*ln(1+x)*e-1/36/(1+x)*d+1/36/(
1+x)*e-19/864*ln(x-2)*d-1/27*ln(x-2)*e-1/144/(x-2)*d-1/72/(x-2)*e-1/36/(x-1)*d-1/36/(x-1)*e+1/108*ln(x-1)*d+1/
27*ln(x-1)*e

________________________________________________________________________________________

Maxima [A]  time = 0.93689, size = 112, normalized size = 1.19 \begin{align*} \frac{1}{864} \,{\left (19 \, d - 32 \, e\right )} \log \left (x + 2\right ) - \frac{1}{108} \,{\left (d - 4 \, e\right )} \log \left (x + 1\right ) + \frac{1}{108} \,{\left (d + 4 \, e\right )} \log \left (x - 1\right ) - \frac{1}{864} \,{\left (19 \, d + 32 \, e\right )} \log \left (x - 2\right ) - \frac{5 \, d x^{3} + 8 \, e x^{2} - 17 \, d x - 20 \, e}{72 \,{\left (x^{4} - 5 \, x^{2} + 4\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="maxima")

[Out]

1/864*(19*d - 32*e)*log(x + 2) - 1/108*(d - 4*e)*log(x + 1) + 1/108*(d + 4*e)*log(x - 1) - 1/864*(19*d + 32*e)
*log(x - 2) - 1/72*(5*d*x^3 + 8*e*x^2 - 17*d*x - 20*e)/(x^4 - 5*x^2 + 4)

________________________________________________________________________________________

Fricas [B]  time = 2.49327, size = 446, normalized size = 4.74 \begin{align*} -\frac{60 \, d x^{3} + 96 \, e x^{2} - 204 \, d x -{\left ({\left (19 \, d - 32 \, e\right )} x^{4} - 5 \,{\left (19 \, d - 32 \, e\right )} x^{2} + 76 \, d - 128 \, e\right )} \log \left (x + 2\right ) + 8 \,{\left ({\left (d - 4 \, e\right )} x^{4} - 5 \,{\left (d - 4 \, e\right )} x^{2} + 4 \, d - 16 \, e\right )} \log \left (x + 1\right ) - 8 \,{\left ({\left (d + 4 \, e\right )} x^{4} - 5 \,{\left (d + 4 \, e\right )} x^{2} + 4 \, d + 16 \, e\right )} \log \left (x - 1\right ) +{\left ({\left (19 \, d + 32 \, e\right )} x^{4} - 5 \,{\left (19 \, d + 32 \, e\right )} x^{2} + 76 \, d + 128 \, e\right )} \log \left (x - 2\right ) - 240 \, e}{864 \,{\left (x^{4} - 5 \, x^{2} + 4\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="fricas")

[Out]

-1/864*(60*d*x^3 + 96*e*x^2 - 204*d*x - ((19*d - 32*e)*x^4 - 5*(19*d - 32*e)*x^2 + 76*d - 128*e)*log(x + 2) +
8*((d - 4*e)*x^4 - 5*(d - 4*e)*x^2 + 4*d - 16*e)*log(x + 1) - 8*((d + 4*e)*x^4 - 5*(d + 4*e)*x^2 + 4*d + 16*e)
*log(x - 1) + ((19*d + 32*e)*x^4 - 5*(19*d + 32*e)*x^2 + 76*d + 128*e)*log(x - 2) - 240*e)/(x^4 - 5*x^2 + 4)

________________________________________________________________________________________

Sympy [B]  time = 2.65074, size = 604, normalized size = 6.43 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x**4-5*x**2+4)**2,x)

[Out]

-(d - 4*e)*log(x + (-6006260*d**4*e + 2341251*d**4*(d - 4*e) - 18247680*d**2*e**3 + 24099840*d**2*e**2*(d - 4*
e) + 7387904*d**2*e*(d - 4*e)**2 - 665280*d**2*(d - 4*e)**3 + 587202560*e**5 - 12582912*e**4*(d - 4*e) - 36700
160*e**3*(d - 4*e)**2 + 786432*e**2*(d - 4*e)**3)/(1675971*d**5 - 66150400*d**3*e**2 + 318767104*d*e**4))/108
+ (d + 4*e)*log(x + (-6006260*d**4*e - 2341251*d**4*(d + 4*e) - 18247680*d**2*e**3 - 24099840*d**2*e**2*(d + 4
*e) + 7387904*d**2*e*(d + 4*e)**2 + 665280*d**2*(d + 4*e)**3 + 587202560*e**5 + 12582912*e**4*(d + 4*e) - 3670
0160*e**3*(d + 4*e)**2 - 786432*e**2*(d + 4*e)**3)/(1675971*d**5 - 66150400*d**3*e**2 + 318767104*d*e**4))/108
 + (19*d - 32*e)*log(x + (-6006260*d**4*e - 2341251*d**4*(19*d - 32*e)/8 - 18247680*d**2*e**3 - 3012480*d**2*e
**2*(19*d - 32*e) + 115436*d**2*e*(19*d - 32*e)**2 + 10395*d**2*(19*d - 32*e)**3/8 + 587202560*e**5 + 1572864*
e**4*(19*d - 32*e) - 573440*e**3*(19*d - 32*e)**2 - 1536*e**2*(19*d - 32*e)**3)/(1675971*d**5 - 66150400*d**3*
e**2 + 318767104*d*e**4))/864 - (19*d + 32*e)*log(x + (-6006260*d**4*e + 2341251*d**4*(19*d + 32*e)/8 - 182476
80*d**2*e**3 + 3012480*d**2*e**2*(19*d + 32*e) + 115436*d**2*e*(19*d + 32*e)**2 - 10395*d**2*(19*d + 32*e)**3/
8 + 587202560*e**5 - 1572864*e**4*(19*d + 32*e) - 573440*e**3*(19*d + 32*e)**2 + 1536*e**2*(19*d + 32*e)**3)/(
1675971*d**5 - 66150400*d**3*e**2 + 318767104*d*e**4))/864 - (5*d*x**3 - 17*d*x + 8*e*x**2 - 20*e)/(72*x**4 -
360*x**2 + 288)

________________________________________________________________________________________

Giac [A]  time = 1.10026, size = 126, normalized size = 1.34 \begin{align*} \frac{1}{864} \,{\left (19 \, d - 32 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) - \frac{1}{108} \,{\left (d - 4 \, e\right )} \log \left ({\left | x + 1 \right |}\right ) + \frac{1}{108} \,{\left (d + 4 \, e\right )} \log \left ({\left | x - 1 \right |}\right ) - \frac{1}{864} \,{\left (19 \, d + 32 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac{5 \, d x^{3} + 8 \, x^{2} e - 17 \, d x - 20 \, e}{72 \,{\left (x^{4} - 5 \, x^{2} + 4\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="giac")

[Out]

1/864*(19*d - 32*e)*log(abs(x + 2)) - 1/108*(d - 4*e)*log(abs(x + 1)) + 1/108*(d + 4*e)*log(abs(x - 1)) - 1/86
4*(19*d + 32*e)*log(abs(x - 2)) - 1/72*(5*d*x^3 + 8*x^2*e - 17*d*x - 20*e)/(x^4 - 5*x^2 + 4)